// Time.h 计算作用域内程序运行时间的类
#ifndef TIME_H
#define TIME_H

#ifdef WIN32
#include <windows.h>
#else// Linux
#include <sys/time.h>
#endif

namespace custom
{

    class Timer {
    public:
        Timer();

        ~Timer();

#ifdef WIN32
        LARGE_INTEGER getStartTime() const;
#else// Linux
        timeval getStartTime() const;
#endif
    private:
#ifdef WIN32
        LARGE_INTEGER start_time;
        LARGE_INTEGER Hz;
#else// Linux
        timeval start_time;
#endif
    };



}

#endif // TIME_H